#ifndef USER_H
#define USER_H

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "cJSON.h"


struct User {
    char *name;
    char *realname;
    char *tik_tok;
    char *biography;
    int get_like;
    int attention;
    struct AttenNode *Attennext;
    int fan;
    struct FanNode *Fannext;
    int friends;
    struct FriendNode *Friendnext;
    int like;
    struct Work *next;
    struct Work *hidden_works;
    struct Likework *likework_next;
    char *gender;
    char *birthday;
    char *area;
    char *school;
    char *email;
    char *other;
    struct blacklist *black_next;
    int blackcount;
};

void init_all_data(struct User *u);
void save_all_data(struct User *u); 
void init_user(struct User *u);
void output(struct User v);
void free_user(struct User *u);
int is_valid_gender(const char *gender);
int is_valid_birthday(const char *birthday);
void biography(struct User *u, int a);
void add(struct User *u, int a);
void del(struct User *u, int a);
void change(struct User *u, int a);
void check(struct User *u, int a);

#endif
